//行政区域管理 显示表格及js实体

Ext.define("SHApp.System.AdministrativeArea.AreaCmbTree", {
    extend: "SH.Core.CmbTree",
    alias: "widget.areacmbtree",
    dataUrl: "/api/areaTree?format=json&pLevel=2",
    model: "AreaModel",
    treeFields: ["id", "leaf", "text","Code","Spell","pLevel"],
    autoSync: true,
    matchFieldWidth: false,
    sorters: [{
        property: 'Code',
        direction: 'ASC'
    }],
    listConfig: {
        width: 300
    },
    minChars: 1,
    valueField: "Code",
    displayField: "text",
    maxLength: 100,
    forceSelection: false,
    initComponent: function () {
        Ext.apply(this);
        this.callParent(arguments);
    },
    
    clearData: function () { 
        this.clearValue();
        this.store.removeAll();
    }
});
